package com.zhengjiang.pattern.demo.observer;

import java.util.Observer;

public class NewsOfficeCenter {
    public static void main(String[] args) {
        Observer readerA = new Reader("ReaderA");
        Observer readerB = new Reader("ReaderB");
        NewsOffice office = new NewsOffice();
        office.addObserver(readerA);
        office.addObserver(readerB);
        office.publish("today news!");
    }
}
